#include <stdio.h>


union test
{
    int a;
    char b;
};

int main()
{
    union test t;
    t.a = 0x12345678;
    if(t.b == 0x12)
    {
        printf("大端\n");
    }
    else if(t.b == 0x78)
    {
        printf("小端\n");
    }
    //printf("%c\n",t.b);
    return 0;
}